using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
using Planisoft.Entities;

namespace Planisoft.DAO.Mapping
{
    public class EpsServiciosPropioMap : EntityTypeConfiguration<EpsServiciosPropio>
    {
        public EpsServiciosPropioMap()
        {
            // Primary Key
            this.HasKey(t => t.IdEps);

            // Properties
            this.Property(t => t.CodPdtRucEps)
                .IsRequired()
                .HasMaxLength(15);

            this.Property(t => t.DescEps)
                .IsRequired();

            // Table & Column Mappings
            this.ToTable("EpsServiciosPropios");
            this.Property(t => t.IdEps).HasColumnName("IdEps");
            this.Property(t => t.CodPdtRucEps).HasColumnName("CodPdtRucEps");
            this.Property(t => t.DescEps).HasColumnName("DescEps");
        }
    }
}
